Gate Functions#

These functions facilitate the application of (elementary) quantum gates. Note that these functions only work for Qubits registered in QuantumSessions and not for QuantumCircuits.

measure(qubits[, clbits])

Performs a measurement of the specified Qubit.

x(qubits)

Applies an X gate.

y(qubits)

Applies a Y gate.

z(qubits)

Applies a Z gate.

h(qubits)

Applies an H gate.

cx(control, target)

Applies a CX gate.

cy(control, target)

Applies a CY gate.

cz(control, target)

Applies a CZ gate.

p(phi, qubits)

Applies a phase gate.

cp(phi, qubits_0, qubits_1)

Applies a controlled phase gate.

rx(phi, qubits)

Applies an RX gate.

ry(phi, qubits)

Applies an RY gate.

rz(phi, qubits)

Applies an RY gate.

mcx(controls, target[, method, ctrl_state, ...])

Applies a multi-controlled X gate.

mcz(qubits[, method, ctrl_state, num_ancilla])

Applies a multi-controlled Z gate.

mcp(phi, qubits[, method, ctrl_state])

Applies a multi-controlled phase gate.

crz(phi, qubits_0, qubits_1)

Applies controled RZ gate

s(qubits)

Applies an S gate.

s_dg(qubits)

Applies a daggered S gate.

t(qubits)

Applies a T gate.

t_dg(qubits)

Applies a daggered T gate.

sx(qubits)

Applies an SX gate.

sx_dg(qubits)

Applies a daggered SX gate.

swap(qubits_0, qubits_1)

Applies a SWAP gate.

rxx(phi, qubits_0, qubits_1)

Applies an RXX gate.

rzz(phi, qubits_0, qubits_1)

Applies an RZZ gate.

xxyy(phi, beta, qubits_0, qubits_1)

Applies an XXYY interaction gate.

u3(theta, phi, lam, qubits)

Applies an U3 gate.

barrier(qubits)

A visual marker for structuring the QuantumCircuit.

gphase(phi, qubits)

Applies a global phase.

id(qubits)

Applies an ID gate.